<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStudentFirstBillingTimeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('student_first_billing_time', function (Blueprint $table) {
            $table->timestamp('updated_at')->useCurrent();
            $table->timestamp('created_at');

            $table->integer('student_id');
            $table->integer('bill_id');
            $table->integer('product_id');
            $table->tinyInteger('billing_type')->default(1);
            $table->timestamp('billing_time');

            $table->softDeletes();

            $table->primary('student_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('student_first_billing_time');
    }
}
